<script src="<?= base_url(); ?>third_party/ckeditor/ckeditor.js"></script>
<style type="text/css">
.nicEdit-main {
	background-color: white !important;
	padding: 5px;
}
</style>
<div class="heading-buttons">
	<h3 class="glyphicons no-js e-mail">
		<i></i> Website Settings
	</h3>
</div>
<div class="separator"></div>
<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons e-mail">
			<i></i>Website Settings
		</h4>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="setting" method="POST"
									action="<?=base_url(); ?>secure/settings/web_settings/getSetting/">
							  
			
				<?php if($this->session->flashdata('message'))
				{
					$msg=$this->session->flashdata('message');
					echo '<font color="red">'.$msg.'</font>';
				}
				?>

				<table width="100%" cellpadding="4" cellspacing="4">

					<tr>

						<td width="20%">Select Settings:</td>
						<td width="60%"><select name="website_settings" onchange="this.form.submit()">
                            <option value="">Select Settings --></option>
                          	<?php foreach ($settings['all'] as $settings):?>
                    	  <option value="<?= $settings->id; ?>"><?= $settings->variable; ?></option>
										
										<?php endforeach;?>
									       
                        </select>
						</td>

					</tr>
				</table>


			</form>
		</div>
	</div>
</div>

<?php if (isset($row['info']->id)) { ?>
<div class="widget widget-2 widget-body-white">
	<div class="widget-head">
		<h4 class="heading glyphicons e-mail">
			<i></i> Website Settings:
			<?= $row['info']->variable; ?>
		</h4>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="setting_update" method="POST"
				action="<?=base_url(); ?>secure/settings/web_settings/update">


				<input type="hidden" name="website_settings"
					value="<?= $row['info']->variable; ?>">




				<?php
				if ($this->session->flashdata('message')) {
					$msg = $this->session->flashdata('message');
					echo '<font color="red">' . $msg . '</font>';
				}
				?>

<input type="hidden" name="website_settings"
								value="<?= $row['info']->variable; ?>">
					  <table class="table table-condensed" >
					  <tbody>	
					  <tr><td>	
				<textarea id="web_settings" class="span12" name="web_detail"><?= $row['info']->value;?></textarea>
				</td>

				</tr>
				<tr>
				<td>
				<input type="hidden" name="web_id" value="<?= $row['info']->id;?>" /> 
				
				<button type="submit"
					class="pull-right btn btn-info" value="Update<?= ucfirst($row['info']->variable); ?>" name="update_settings" 
					<?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');" >

<i></i>Update <?= ucfirst($row['info']->variable);?></button>
</td>
</tr>
</tbody>
</table>
			</form>
		</div>
	</div>
</div>
<?php }?>
